package com.yulp.springboot2task.job;

import java.util.Map;

/**
 * @description: Quartz执行传参类
 * @date: 2019/11/6 15:30.
 * @author: yulipeng.
 */
public class QuartzTimeParam {

    /**
     * @param jobName          任务名
     * @param jobGroupName     任务组名
     * @param triggerName      触发器名
     * @param triggerGroupName 触发器组名
     * @param jobClass         任务
     * @param afterSeconds     多少秒后开始执行（立即执行可传0）
     * @param cron             Cron方式参数：时间设置: cron表达式；（cron或Simple二选一）
     * @param intervalInSeconds Simple方式参数1：每间隔多少秒执行一次；（cron或Simple二选一）
     * @param repeatCount      Simple方式参数2：共执行n+1次
     * @param data             job传参（无参可传空）
    /**
     * 任务名（保持唯一）
     */
    private String jobName;
    /**
     * 任务组名
     */
    private String jobGroupName;
    /**
     * 触发器名（保持唯一）
     */
    private String triggerName;
    /**
     * 触发器组名
     */
    private String triggerGroupName;
    /**
     * 任务
     */
    private Class jobClass;
    /**
     * 多少秒后开始执行（立即执行可传0）
     */
    private Long afterSeconds;

    /**
     * Cron方式参数：时间设置: cron表达式；（cron或Simple二选一）
     */
    private String cron;
    /**
     * Simple方式参数1：每间隔多少秒执行一次；（cron或Simple二选一）
     */
    private Integer intervalInSeconds;

    /**
     * Simple方式参数2：共执行n+1次
     */
    private Integer repeatCount;

    /**
     * 传参
     */
    private Map<String, String> data;

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getJobGroupName() {
        return jobGroupName;
    }

    public void setJobGroupName(String jobGroupName) {
        this.jobGroupName = jobGroupName;
    }

    public String getTriggerName() {
        return triggerName;
    }

    public void setTriggerName(String triggerName) {
        this.triggerName = triggerName;
    }

    public String getTriggerGroupName() {
        return triggerGroupName;
    }

    public void setTriggerGroupName(String triggerGroupName) {
        this.triggerGroupName = triggerGroupName;
    }

    public Class getJobClass() {
        return jobClass;
    }

    public void setJobClass(Class jobClass) {
        this.jobClass = jobClass;
    }

    public Long getAfterSeconds() {
        return afterSeconds;
    }

    public void setAfterSeconds(Long afterSeconds) {
        this.afterSeconds = afterSeconds;
    }

    public String getCron() {
        return cron;
    }

    public void setCron(String cron) {
        this.cron = cron;
    }

    public Integer getIntervalInSeconds() {
        return intervalInSeconds;
    }

    public void setIntervalInSeconds(Integer intervalInSeconds) {
        this.intervalInSeconds = intervalInSeconds;
    }

    public Integer getRepeatCount() {
        return repeatCount;
    }

    public void setRepeatCount(Integer repeatCount) {
        this.repeatCount = repeatCount;
    }

    public Map<String, String> getData() {
        return data;
    }

    public void setData(Map<String, String> data) {
        this.data = data;
    }
}
